var MonsterTemp = new Object;

//This script deals with Monster Stats and the 
//different battles that the player can face

function LoadMonster(Monstertype)
{
  if (Monstertype == "Rabbit")
  {
  MonsterTemp.sprite = "Rabbit.rss";  
  MonsterTemp.name = "Rabbit";  
  MonsterTemp.hp = 30;
  MonsterTemp.maxhp = 30;
  MonsterTemp.mp = 5;
  MonsterTemp.maxmp = 5;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 15;
  MonsterTemp.attack = 15;
  MonsterTemp.agi = 15;
  MonsterTemp.evade = 3;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 20;
  MonsterTemp.exp = 15;
  MonsterTemp.gold = 15;
  MonsterTemp.weak = "None";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "None";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.5;
  MonsterTemp.run = 10;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "Attack";
  MonsterTemp.special2 = "Attack";
  MonsterTemp.special3 = "Bite";
  MonsterTemp.special4 = "Bite";
  MonsterTemp.ai = "Standard";
  }
  else if (Monstertype == "Crow")
  {
  MonsterTemp.sprite = "Crow.rss";  
  MonsterTemp.name = "Crow";  
  MonsterTemp.hp = 35;
  MonsterTemp.maxhp = 35;
  MonsterTemp.mp = 5;
  MonsterTemp.maxmp = 5;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 20;
  MonsterTemp.attack = 20;
  MonsterTemp.agi = 20;
  MonsterTemp.evade = 4;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 20;
  MonsterTemp.exp = 20;
  MonsterTemp.gold = 25;
  MonsterTemp.weak = "None";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "Earth";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.25;
  MonsterTemp.run = 10;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "Attack";
  MonsterTemp.special2 = "Attack";
  MonsterTemp.special3 = "Bite";
  MonsterTemp.special4 = "Bite";
  MonsterTemp.ai = "Standard";
  }
  else if (Monstertype == "Ricator")
  {
  MonsterTemp.sprite = "Ricator.rss";  
  MonsterTemp.name = "Ricator";  
  MonsterTemp.hp = 350;
  MonsterTemp.maxhp = 350;
  MonsterTemp.mp = 10;
  MonsterTemp.maxmp = 10;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 25;
  MonsterTemp.attack = 25;
  MonsterTemp.agi = 24;
  MonsterTemp.evade = 5;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 30;
  MonsterTemp.exp = 175;
  MonsterTemp.gold = 220;
  MonsterTemp.weak = "None";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "None";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.0;
  MonsterTemp.run = 0;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "CureSelf";
  MonsterTemp.special2 = "CureSelf";
  MonsterTemp.special3 = "Bite";
  MonsterTemp.special4 = "Bite";
  MonsterTemp.ai = "SP4WhenLow";
  }
  else if (Monstertype == "Rat")
  {
  MonsterTemp.sprite = "Rat.rss";  
  MonsterTemp.name = "Rat";  
  MonsterTemp.hp = 3;
  MonsterTemp.maxhp = 3;
  MonsterTemp.mp = 1;
  MonsterTemp.maxmp = 1;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 10;
  MonsterTemp.attack = 10;
  MonsterTemp.agi = 0;
  MonsterTemp.evade = 0;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 30;
  MonsterTemp.exp = 2;
  MonsterTemp.gold = 0;
  MonsterTemp.weak = "None";
  MonsterTemp.strong = "Sickness";
  MonsterTemp.immune = "None";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.0;
  MonsterTemp.run = 0;
  MonsterTemp.specialchance = 0.00;
  MonsterTemp.special1 = "Attack";
  MonsterTemp.special2 = "Attack";
  MonsterTemp.special3 = "Attack";
  MonsterTemp.special4 = "Attack";
  MonsterTemp.ai = "Standard";
  }
  else if (Monstertype == "Wild Dog")
  {
  MonsterTemp.sprite = "WildDog.rss";  
  MonsterTemp.name = "Wild Dog";  
  MonsterTemp.hp = 55;
  MonsterTemp.maxhp = 55;
  MonsterTemp.mp = 5;
  MonsterTemp.maxmp = 5;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 23;
  MonsterTemp.attack = 23;
  MonsterTemp.agi = 20;
  MonsterTemp.evade = 4;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 20;
  MonsterTemp.exp = 35;
  MonsterTemp.gold = 30;
  MonsterTemp.weak = "None";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "None";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.25;
  MonsterTemp.run = 10;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "Attack";
  MonsterTemp.special2 = "Bite";
  MonsterTemp.special3 = "Bite";
  MonsterTemp.special4 = "Bite";
  MonsterTemp.ai = "Standard";
  }
  else if (Monstertype == "Wolf")
  {
  MonsterTemp.sprite = "Wolf.rss";  
  MonsterTemp.name = "Wolf";  
  MonsterTemp.hp = 65;
  MonsterTemp.maxhp = 65;
  MonsterTemp.mp = 5;
  MonsterTemp.maxmp = 5;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 30;
  MonsterTemp.attack = 30;
  MonsterTemp.agi = 40;
  MonsterTemp.evade = 8;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 20;
  MonsterTemp.exp = 46;
  MonsterTemp.gold = 48;
  MonsterTemp.weak = "None";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "None";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.25;
  MonsterTemp.run = 10;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "Attack";
  MonsterTemp.special2 = "Bite";
  MonsterTemp.special3 = "Bite";
  MonsterTemp.special4 = "Bite";
  MonsterTemp.ai = "Standard";
  }
  else if (Monstertype == "Crab")
  {
  MonsterTemp.sprite = "Crab.rss";  
  MonsterTemp.name = "Crab";  
  MonsterTemp.hp = 50;
  MonsterTemp.maxhp = 50;
  MonsterTemp.mp = 5;
  MonsterTemp.maxmp = 5;
  MonsterTemp.vit = 60;
  MonsterTemp.defence = 60;
  MonsterTemp.str = 23;
  MonsterTemp.attack = 23;
  MonsterTemp.agi = 20;
  MonsterTemp.evade = 4;
  MonsterTemp.mag = 35;
  MonsterTemp.luck = 20;
  MonsterTemp.exp = 44;
  MonsterTemp.gold = 34;
  MonsterTemp.weak = "Lit";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "None";
  MonsterTemp.absorb = "Water";
  MonsterTemp.runchance = 0.25;
  MonsterTemp.run = 10;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "Cold Foam";
  MonsterTemp.special2 = "Cold Foam";
  MonsterTemp.special3 = "Cold Foam";
  MonsterTemp.special4 = "Cold Foam";
  MonsterTemp.ai = "Standard";
  }
  else if (Monstertype == "Brown Bear")
  {
  MonsterTemp.sprite = "BrownBear.rss";  
  MonsterTemp.name = "Brown Bear";  
  MonsterTemp.hp = 125;
  MonsterTemp.maxhp = 125;
  MonsterTemp.mp = 5;
  MonsterTemp.maxmp = 5;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 33;
  MonsterTemp.attack = 33;
  MonsterTemp.agi = 30;
  MonsterTemp.evade = 6;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 30;
  MonsterTemp.exp = 78;
  MonsterTemp.gold = 53;
  MonsterTemp.weak = "None";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "None";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.25;
  MonsterTemp.run = 10;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "Attack";
  MonsterTemp.special2 = "Attack";
  MonsterTemp.special3 = "Bite";
  MonsterTemp.special4 = "Bite";
  MonsterTemp.ai = "Standard";
  }
  else if (Monstertype == "Blue Wyvern")
  {
  MonsterTemp.sprite = "BlueWyvern.rss";  
  MonsterTemp.name = "Blue Wyvern";  
  MonsterTemp.hp = 100;
  MonsterTemp.maxhp = 100;
  MonsterTemp.mp = 15;
  MonsterTemp.maxmp = 15;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 35;
  MonsterTemp.attack = 35;
  MonsterTemp.agi = 25;
  MonsterTemp.evade = 5;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 30;
  MonsterTemp.exp = 78;
  MonsterTemp.gold = 38;
  MonsterTemp.weak = "Wind";
  MonsterTemp.strong = "Ice";
  MonsterTemp.immune = "Earth";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.25;
  MonsterTemp.run = 30;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "Attack";
  MonsterTemp.special2 = "Attack";
  MonsterTemp.special3 = "Flap";
  MonsterTemp.special4 = "Flap";
  MonsterTemp.ai = "Standard";
  }


  else if (Monstertype == "Southern Tusk")
  {
  MonsterTemp.sprite = "SouthernTusk.rss";  
  MonsterTemp.name = "Southern Tusk";  
  MonsterTemp.hp = 200;
  MonsterTemp.maxhp = 200;
  MonsterTemp.mp = 5;
  MonsterTemp.maxmp = 5;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 40;
  MonsterTemp.attack = 40;
  MonsterTemp.agi = 10;
  MonsterTemp.evade = 2;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 20;
  MonsterTemp.exp = 142;
  MonsterTemp.gold = 80;
  MonsterTemp.weak = "Fire";
  MonsterTemp.strong = "Ice";
  MonsterTemp.immune = "None";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.0;
  MonsterTemp.run = 0;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "CureSelf";
  MonsterTemp.special2 = "Bite";
  MonsterTemp.special3 = "Bite";
  MonsterTemp.special4 = "CureSelf";
  MonsterTemp.ai = "SP4WhenLow";
  }
  else if (Monstertype == "Cornet")
  {
  MonsterTemp.sprite = "Cornet.rss";  
  MonsterTemp.name = "Cornet";  
  MonsterTemp.hp = 75;
  MonsterTemp.maxhp = 75;
  MonsterTemp.mp = 5;
  MonsterTemp.maxmp = 5;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 30;
  MonsterTemp.attack = 30;
  MonsterTemp.agi = 40;
  MonsterTemp.evade = 8;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 30;
  MonsterTemp.exp = 87;
  MonsterTemp.gold = 52;
  MonsterTemp.weak = "Wind";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "Earth";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.25;
  MonsterTemp.run = 25;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "Attack";
  MonsterTemp.special2 = "Attack";
  MonsterTemp.special3 = "Sting";
  MonsterTemp.special4 = "Sting";
  MonsterTemp.ai = "Standard";
  }
  else if (Monstertype == "MBandit")
  {
  MonsterTemp.sprite = "MBandit.rss";  
  MonsterTemp.name = "Bandit";  
  MonsterTemp.hp = 225;
  MonsterTemp.maxhp = 225;
  MonsterTemp.mp = 15;
  MonsterTemp.maxmp = 15;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 55;
  MonsterTemp.attack = 55;
  MonsterTemp.agi = 40;
  MonsterTemp.evade = 8;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 45;
  MonsterTemp.exp = 156;
  MonsterTemp.gold = 200;
  MonsterTemp.weak = "None";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "None";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.75;
  MonsterTemp.run = 30;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "CureSelf";
  MonsterTemp.special2 = "CureSelf";
  MonsterTemp.special3 = "Smack";
  MonsterTemp.special4 = "Smack";
  MonsterTemp.ai = "Standard";
  }
  else if (Monstertype == "Queen Cornet")
  {
  MonsterTemp.sprite = "QueenCornet.rss";  
  MonsterTemp.name = "Queen Cornet";  
  MonsterTemp.hp = 700;
  MonsterTemp.maxhp = 700;
  MonsterTemp.mp = 35;
  MonsterTemp.maxmp = 35;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 60;
  MonsterTemp.attack = 60;
  MonsterTemp.agi = 30;
  MonsterTemp.evade = 6;
  MonsterTemp.mag = 45;
  MonsterTemp.luck = 40;
  MonsterTemp.exp = 639;
  MonsterTemp.gold = 178;
  MonsterTemp.weak = "Wind";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "Earth";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.0;
  MonsterTemp.run = 0;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "Sting";
  MonsterTemp.special2 = "Sting";
  MonsterTemp.special3 = "CureSelf";
  MonsterTemp.special4 = "CureSelf";
  MonsterTemp.ai = "SP4WhenLow";
  }
  else if (Monstertype == "Ricator2")
  {
  MonsterTemp.sprite = "Ricator.rss";  
  MonsterTemp.name = "Ricator";  
  MonsterTemp.hp = 350;
  MonsterTemp.maxhp = 350;
  MonsterTemp.mp = 10;
  MonsterTemp.maxmp = 10;
  MonsterTemp.vit = 45;
  MonsterTemp.defence = 45;
  MonsterTemp.str = 55;
  MonsterTemp.attack = 55;
  MonsterTemp.agi = 24;
  MonsterTemp.evade = 5;
  MonsterTemp.mag = 25;
  MonsterTemp.luck = 30;
  MonsterTemp.exp = 209;
  MonsterTemp.gold = 300;
  MonsterTemp.weak = "None";
  MonsterTemp.strong = "None";
  MonsterTemp.immune = "None";
  MonsterTemp.absorb = "None";
  MonsterTemp.runchance = 0.0;
  MonsterTemp.run = 0;
  MonsterTemp.specialchance = 0.25;
  MonsterTemp.special1 = "CureSelf";
  MonsterTemp.special2 = "CureSelf";
  MonsterTemp.special3 = "Bite";
  MonsterTemp.special4 = "Bite";
  MonsterTemp.ai = "SP4WhenLow";
  }
}
function PlaceMonster(MonsterNumber)
{
  if (MonsterNumber == 1)
  {
  Monster1.sprite = MonsterTemp.sprite;  
  Monster1.name =  MonsterTemp.name;  
  Monster1.hp = MonsterTemp.hp;
  Monster1.maxhp = MonsterTemp.maxhp;
  Monster1.mp = MonsterTemp.mp;
  Monster1.maxmp = MonsterTemp.maxmp;
  Monster1.vit = MonsterTemp.vit;
  Monster1.defence = MonsterTemp.defence;
  Monster1.str = MonsterTemp.str;
  Monster1.attack = MonsterTemp.attack;
  Monster1.agi = MonsterTemp.agi;
  Monster1.evade = MonsterTemp.evade;
  Monster1.mag = MonsterTemp.mag;
  Monster1.luck = MonsterTemp.luck;
  Monster1.exp = MonsterTemp.exp;
  Monster1.gold = MonsterTemp.gold;
  Monster1.weak = MonsterTemp.weak;
  Monster1.strong = MonsterTemp.strong;
  Monster1.immune = MonsterTemp.immune;
  Monster1.absorb = MonsterTemp.absorb; 
  Monster1.runchance = MonsterTemp.runchance;
  Monster1.run = MonsterTemp.run;
  Monster1.specialchance = MonsterTemp.specialchance;
  Monster1.special1 = MonsterTemp.special1;
  Monster1.special2 = MonsterTemp.special2;
  Monster1.special3 = MonsterTemp.special3;
  Monster1.special4 = MonsterTemp.special4;
  Monster1.ai = MonsterTemp.ai;
  }
  else if (MonsterNumber == 2)
  {
  Monster2.sprite = MonsterTemp.sprite;  
  Monster2.name =  MonsterTemp.name;  
  Monster2.hp = MonsterTemp.hp;
  Monster2.maxhp = MonsterTemp.maxhp;
  Monster2.mp = MonsterTemp.mp;
  Monster2.maxmp = MonsterTemp.maxmp;
  Monster2.vit = MonsterTemp.vit;
  Monster2.defence = MonsterTemp.defence;
  Monster2.str = MonsterTemp.str;
  Monster2.attack = MonsterTemp.attack;
  Monster2.agi = MonsterTemp.agi;
  Monster2.evade = MonsterTemp.evade;
  Monster2.mag = MonsterTemp.mag;
  Monster2.luck = MonsterTemp.luck;
  Monster2.exp = MonsterTemp.exp;
  Monster2.gold = MonsterTemp.gold;
  Monster2.weak = MonsterTemp.weak;
  Monster2.strong = MonsterTemp.strong;
  Monster2.immune = MonsterTemp.immune;
  Monster2.absorb = MonsterTemp.absorb;
  Monster2.runchance = MonsterTemp.runchance;
  Monster2.run = MonsterTemp.run;
  Monster2.specialchance = MonsterTemp.specialchance;
  Monster2.special1 = MonsterTemp.special1;
  Monster2.special2 = MonsterTemp.special2;
  Monster2.special3 = MonsterTemp.special3;
  Monster2.special4 = MonsterTemp.special4;
  Monster2.ai = MonsterTemp.ai;
  }
  else if (MonsterNumber == 3)
  {
  Monster3.sprite = MonsterTemp.sprite;  
  Monster3.name =  MonsterTemp.name;  
  Monster3.hp = MonsterTemp.hp;
  Monster3.maxhp = MonsterTemp.maxhp;
  Monster3.mp = MonsterTemp.mp;
  Monster3.maxmp = MonsterTemp.maxmp;
  Monster3.vit = MonsterTemp.vit;
  Monster3.defence = MonsterTemp.defence;
  Monster3.str = MonsterTemp.str;
  Monster3.attack = MonsterTemp.attack;
  Monster3.agi = MonsterTemp.agi;
  Monster3.evade = MonsterTemp.evade;
  Monster3.mag = MonsterTemp.mag;
  Monster3.luck = MonsterTemp.luck;
  Monster3.exp = MonsterTemp.exp;
  Monster3.gold = MonsterTemp.gold;
  Monster3.weak = MonsterTemp.weak;
  Monster3.strong = MonsterTemp.strong;
  Monster3.immune = MonsterTemp.immune;
  Monster3.absorb = MonsterTemp.absorb;
  Monster3.runchance = MonsterTemp.runchance;
  Monster3.run = MonsterTemp.run;
  Monster3.specialchance = MonsterTemp.specialchance;
  Monster3.special1 = MonsterTemp.special1;
  Monster3.special2 = MonsterTemp.special2;
  Monster3.special3 = MonsterTemp.special3;
  Monster3.special4 = MonsterTemp.special4;
  Monster3.ai = MonsterTemp.ai;
  }
  else if (MonsterNumber == 4)
  {
  Monster4.sprite = MonsterTemp.sprite;  
  Monster4.name =  MonsterTemp.name;  
  Monster4.hp = MonsterTemp.hp;
  Monster4.maxhp = MonsterTemp.maxhp;
  Monster4.mp = MonsterTemp.mp;
  Monster4.maxmp = MonsterTemp.maxmp;
  Monster4.vit = MonsterTemp.vit;
  Monster4.defence = MonsterTemp.defence;
  Monster4.str = MonsterTemp.str;
  Monster4.attack = MonsterTemp.attack;
  Monster4.agi = MonsterTemp.agi;
  Monster4.evade = MonsterTemp.evade;
  Monster4.mag = MonsterTemp.mag;
  Monster4.luck = MonsterTemp.luck;
  Monster4.exp = MonsterTemp.exp;
  Monster4.gold = MonsterTemp.gold;
  Monster4.weak = MonsterTemp.weak;
  Monster4.strong = MonsterTemp.strong;
  Monster4.immune = MonsterTemp.immune;
  Monster4.absorb = MonsterTemp.absorb;
  Monster4.runchance = MonsterTemp.runchance;
  Monster4.run = MonsterTemp.run;
  Monster4.specialchance = MonsterTemp.specialchance;
  Monster4.special1 = MonsterTemp.special1;
  Monster4.special2 = MonsterTemp.special2;
  Monster4.special3 = MonsterTemp.special3;
  Monster4.special4 = MonsterTemp.special4;
  Monster4.ai = MonsterTemp.ai;
  }
}


function BattleTypes(area)
{
Player.tempystr = Player.str
Player2.tempystr = Player2.str
Player3.tempystr = Player3.str

Player.str = Player.attack;
Player2.str = Player2.attack;
Player3.str = Player3.attack;

Player.stun = 0;
Player2.stun = 0;
Player3.stun = 0;

Battle.runable = true;

  if (area == "Grass1")
  {
    if (Math.random() >= 0.5)
    {
    Battle.monsternum = 4;
    }
    else
    {
    Battle.monsternum = 3;
    }    
  Battle.Item = "";
  Battle.ItemChance = 0.0;
  LoadMonster("Rabbit")
  PlaceMonster(1);
  Monster1.name = Monster1.name + " 1";
  PlaceMonster(2);
  Monster2.name = Monster2.name + " 2";
  PlaceMonster(3);
  Monster3.name = Monster3.name + " 3";

    if (Battle.monsternum == 4)
    {
    PlaceMonster(4);
    Monster4.name = Monster4.name + " 4";
    }
  }
  if (area == "Grass2")
  {
    if (Math.random() >= 0.5)
    {
    Battle.monsternum = 4;
    }
    else
    {
    Battle.monsternum = 3;
    }    
  Battle.Item = "";
  Battle.ItemChance = 0.0;
  LoadMonster("Rabbit")
  PlaceMonster(1);
  Monster1.name = Monster1.name + " 1";
  PlaceMonster(2);
  Monster2.name = Monster2.name + " 2";
    if (Battle.monsternum == 3)
    {
    LoadMonster("Crow")
    PlaceMonster(3);
    }
    else
    {
    LoadMonster("Crow")
    PlaceMonster(3);
    PlaceMonster(4);
    Monster3.name = Monster3.name + " 1";
    Monster4.name = Monster4.name + " 2";
    }
  }
  if (area == "Grass3")
  {
    if (Math.random() >= 0.5)
    {
    Battle.monsternum = 4;
    }
    else
    {
    Battle.monsternum = 3;
    }    
  Battle.Item = "Potion";
  Battle.ItemChance = 0.5;
  LoadMonster("Wild Dog")
  PlaceMonster(1);
  Monster1.name = Monster1.name + " 1";
  PlaceMonster(2);
  Monster2.name = Monster2.name + " 2";
    if (Battle.monsternum == 3)
    {
    LoadMonster("Crab")
    PlaceMonster(3);
    }
    else
    {
    LoadMonster("Crow")
    PlaceMonster(3);
    PlaceMonster(4);
    Monster3.name = Monster3.name + " 1";
    Monster4.name = Monster4.name + " 2";
    }
  }
  if (area == "Grass4")
  {
    if (Math.random() >= 0.5)
    {
    Battle.monsternum = 3;
    }
    else
    {
    Battle.monsternum = 2;
    }    
  Battle.Item = "";
  Battle.ItemChance = 0.0;
    if (Battle.monsternum == 3)
    {
    Battle.Item = "Potion";
    Battle.ItemChance = 0.5;
    LoadMonster("Wolf")
    PlaceMonster(1);
    LoadMonster("Wild Dog")
    PlaceMonster(2);
    Monster2.name = Monster2.name + " 1";
    PlaceMonster(3);
    Monster3.name = Monster3.name + " 2";
    }
    else
    {
    LoadMonster("Wolf")
    PlaceMonster(1);
    Monster1.name = Monster1.name + " 1";
    PlaceMonster(2);
    Monster2.name = Monster2.name + " 2";
    }
  }

  if (area == "Grass5")
  {
    if (Math.random() >= 0.56)
    {
    Battle.monsternum = 3;
    }
    else
    {
    Battle.monsternum = 2;
    }    
  Battle.Item = "";
  Battle.ItemChance = 0.0;

    if (Battle.monsternum == 3)
    {
    LoadMonster("Blue Wyvern")
    PlaceMonster(1);
    PlaceMonster(2);
    PlaceMonster(3);
    Monster1.name = Monster1.name + " 1";
    Monster2.name = Monster2.name + " 2";
    Monster3.name = Monster3.name + " 3";
    }
    else
    {
    Battle.Item = "Life";
    Battle.ItemChance = 0.25;
    LoadMonster("Southern Tusk")
    PlaceMonster(1);
    LoadMonster("Blue Wyvern")
    PlaceMonster(2);
    }
  }

  if (area == "Grass6")
  {
    if (Math.random() >= 0.66)
    {
    Battle.monsternum = 3;
    }
    else if (Math.random() >= 0.5)
    {
    Battle.monsternum = 2;
    }    
    else
    {
    Battle.monsternum = 1;
    }
  Battle.Item = "";
  Battle.ItemChance = 0.0;

    if (Battle.monsternum == 3)
    {
    Battle.Item = "Life";
    Battle.ItemChance = 0.25;
    LoadMonster("Blue Wyvern")
    PlaceMonster(1);
    PlaceMonster(2);
    LoadMonster("Southern Tusk")
    PlaceMonster(3);
    Monster1.name = Monster1.name + " 1";
    Monster2.name = Monster2.name + " 2";
    }
    else if (Battle.monsternum == 2)
    {
    LoadMonster("MBandit")
    PlaceMonster(1);
    PlaceMonster(2);
    Monster1.name = Monster1.name + " 1";
    Monster2.name = Monster2.name + " 2";
    }
    else
    {
    Battle.monsternum = 1;
    Battle.Item = "Ether";
    Battle.ItemChance = 0.5;
    LoadMonster("Ricator2")
    PlaceMonster(1);
    }
  }
  if (area == "Forest4")
  {
    if (Math.random() >= 0.5)
    {
    Battle.monsternum = 4;
    }
    else
    {
    Battle.monsternum = 3;
    }    
  Battle.Item = "";
  Battle.ItemChance = 0.0;
    if (Battle.monsternum == 4)
    {
    LoadMonster("Cornet")
    PlaceMonster(1);
    PlaceMonster(2);
    PlaceMonster(3);
    PlaceMonster(4);

    Monster1.name = Monster1.name + " 1";
    Monster2.name = Monster2.name + " 2";
    Monster3.name = Monster3.name + " 3";
    Monster4.name = Monster4.name + " 4";
    }
    else
    {
    LoadMonster("Blue Wyvern")
    PlaceMonster(1);
    LoadMonster("Cornet")
    PlaceMonster(2);
    PlaceMonster(3);
    Monster2.name = Monster2.name + " 1";
    Monster3.name = Monster3.name + " 2";
    }
  }

  else if (area == "Forest1")
  {
  Battle.monsternum = 4;
  Battle.Item = "";
  Battle.ItemChance = 0.0;
  LoadMonster("Crow");
  PlaceMonster(1);
  Monster1.name = Monster1.name + " 1";
  PlaceMonster(2);
  Monster2.name = Monster2.name + " 2";
  LoadMonster("Rabbit");
  PlaceMonster(3);
  Monster3.name = Monster3.name + " 1";
  PlaceMonster(4);
  Monster4.name = Monster4.name + " 2";
  }
  else if (area == "Forest2")
  {
    if (Math.random() >= 0.5)
    {
    Battle.monsternum = 3;
    }
    else
    {
    Battle.monsternum = 1;
    }    
  Battle.Item = "";
  Battle.ItemChance = 0.0;
  LoadMonster("Brown Bear");
  PlaceMonster(1);
    if (Battle.monsternum == 3)
    {
    LoadMonster("Wild Dog")
    PlaceMonster(2);
    PlaceMonster(3);
    Monster2.name = Monster2.name + " 1";
    Monster3.name = Monster3.name + " 2";
    }    
  }
  else if (area == "Forest3")
  {
    if (Math.random() >= 0.5)
    {
    Battle.monsternum = 4;
    }
    else
    {
    Battle.monsternum = 3;
    }    
  Battle.Item = "";
  Battle.ItemChance = 0.0;
  LoadMonster("Brown Bear");
  PlaceMonster(1);
  PlaceMonster(2);
  PlaceMonster(3);
  Monster1.name = Monster1.name + " 1";
  Monster2.name = Monster2.name + " 2";
  Monster3.name = Monster3.name + " 3";
  
    if (Battle.monsternum == 4)
    {
    LoadMonster("Wolf")
    PlaceMonster(4);
    }    
  }

  else if (area == "PireForest1")
  {
  Battle.monsternum = 3;
  Battle.Item = "";
  Battle.ItemChance = 0.0;

    if (Math.random() >= 0.5)
    {  
    LoadMonster("Crow")
    PlaceMonster(1);
    }
    else
    {
    LoadMonster("Rabbit")
    PlaceMonster(1);
    Monster1.name = Monster1.name + " 1";
    }
    LoadMonster("Rabbit")
    PlaceMonster(2);
    PlaceMonster(3);
  
    if (Monster1.name == "Crow")
    {
    Monster2.name = Monster2.name + " 1";
    Monster3.name = Monster3.name + " 2";
    }
    else
    {
    Monster2.name = Monster2.name + " 2";
    Monster3.name = Monster3.name + " 3";
    }
  }
  else if (area == "Two Rats")
  {
  Battle.runable = false;
  Battle.monsternum = 2;
  Battle.Item = "";
  Battle.ItemChance = 0.0;
  LoadMonster("Rat")
  PlaceMonster(1);
  PlaceMonster(2);
  Monster1.name = Monster1.name + " 1";
  Monster2.name = Monster2.name + " 2";
  Battle.MiscExit = 1;
  }
  else if (area == "Three Rats")
  {
  Battle.runable = false;
  Battle.monsternum = 3;
  Battle.Item = "";
  Battle.ItemChance = 0.0;
  LoadMonster("Rat")
  PlaceMonster(1);
  PlaceMonster(2);
  PlaceMonster(3);
  Monster1.name = Monster1.name + " 1";
  Monster2.name = Monster2.name + " 2";
  Monster3.name = Monster3.name + " 3";
  Battle.MiscExit = 2;
  }
  else if (area == "PangaraCave1")
  {
    if (Math.random() <= 0.33)
    {
    Battle.monsternum = 4;
    }
    else if (Math.random() <= 0.5)
    {
    Battle.monsternum = 3;
    }
    else
    {
    Battle.monsternum = 5;
    }

  Battle.Item = "";
  Battle.ItemChance = 0.0;
    if (Battle.monsternum == 4)
    {
    LoadMonster("Cornet")
    PlaceMonster(1);
    PlaceMonster(2);
    PlaceMonster(3);
    PlaceMonster(4);

    Monster1.name = Monster1.name + " 1";
    Monster2.name = Monster2.name + " 2";
    Monster3.name = Monster3.name + " 3";
    Monster4.name = Monster4.name + " 4";
    }
    else if (Battle.monsternum == 3)
    {
    LoadMonster("Cornet")
    PlaceMonster(1);
    PlaceMonster(2);
    PlaceMonster(3);

    Monster1.name = Monster1.name + " 1";
    Monster2.name = Monster2.name + " 2";
    Monster3.name = Monster3.name + " 3";
    }
    else
    {
    LoadMonster("Cornet")
    PlaceMonster(3);
    PlaceMonster(2);
    LoadMonster("Blue Wyvern");
    PlaceMonster(1);
    Battle.monsternum = 3;
    Monster2.name = Monster2.name + " 1";
    Monster3.name = Monster3.name + " 2";
    }
  }
  else if (area == "PangaraCave1Boss")
  {
  Battle.runable = false;
  Battle.monsternum = 3;
  Battle.Item = "Strange Ore";
  Battle.ItemChance = 1.0;
  LoadMonster("Queen Cornet")
  PlaceMonster(1);
  LoadMonster("Cornet");
  PlaceMonster(2);
  PlaceMonster(3);
  Battle.Talk = false;
  Monster2.name = Monster2.name + " 1";
  Monster3.name = Monster3.name + " 2";
  }
  else if (area == "PireForestBoss")
  {
  Battle.runable = false;
  Battle.monsternum = 1;
  Battle.Item = "Ether";
  Battle.ItemChance = 1;
  LoadMonster("Ricator")
  PlaceMonster(1);
  Battle.Talk = true;
  }
}
